gtk-demo: Small a11y fix
authorMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jan 2021 16:16:10 +0000 (11:16 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jan 2021 16:16:10 +0000 (11:16 -0500)
Label the entry in the assistant demo.

demos/gtk-demo/assistant.c

index a84b87ad819905537b34c72845f9e026feac8893..238bb0524ad78ca79fd5e353da3cd32f08e16061 100644 (file)
@@ -98,6 +98,9 @@ create_page1 (GtkWidget *assistant)
   gtk_box_append (GTK_BOX (box), label);
 
   entry = gtk_entry_new ();
+  gtk_accessible_update_relation (GTK_ACCESSIBLE (entry),
+                                  GTK_ACCESSIBLE_RELATION_LABELLED_BY, label, NULL,
+                                  -1);
   gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
   gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
   gtk_box_append (GTK_BOX (box), entry);